Skip to content

ci: pin sccache v0.19.0 and fail closed on unpinned installs - #772

Open
lazyxeon wants to merge 6 commits into
mainfrom
cursor/pin-sccache-0-19-0-5de0
Open

lazyxeon wants to merge 6 commits into
mainfrom
cursor/pin-sccache-0-19-0-5de0

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Report

  1. Head e2a88c267dab9e0f17f4610896b920e994a7e0d5. GitHub checks on this SHA were not read yet, so this is not claimed green.
  2. Commands: python3 scripts/ci/test_workflow_policy.py exit 0 (41 tests, 1 skipped). python3 scripts/ci/sccache_pin_mutation.py exit 0. actionlint 1.7.7 exit 1. bash scripts/ci/player_facing_names.sh exit 0. cargo run -p aw_doc_lint -- --mode warn exit 0.
  3. Not run: sim and render gates, and cargo test -p astraweave-core --test replay_hash. This diff does not touch a hashed crate. aw_trace_sync --check was not run. This diff does not touch CLAUDE.md, docs/architecture/, or a Cargo.toml.
  4. Measurements: not measured. A cloud agent cannot measure the GTX 1660 Ti frame budget.
  5. Replay hashes: unchanged. No hashed crate changed.
  6. Deferred issues: none.

actionlint exit 1 is the two pre-existing unknown gpu labels at .github/workflows/allocation-measurement.yml:169 and .github/workflows/gpu-frame-budget.yml:31. Those workflows were not edited.

What the tests prove

test_sccache_action_pins_binary_version (scripts/ci/test_workflow_policy.py:2771) asserts the repo violation list is empty, the site count equals EXPECTED_SCCACHE_ACTION_STEPS (:95, value 10), every pass fixture is empty, and every fail fixture is non-empty. test_sccache_pin_scan_reads_workflows_under_root (:2804) asserts path lists, the substring YAML parse error, and specific relative paths. sccache_mutation_checks (:1544) is the root-backed helper. YAML is loaded with yaml.safe_load (:1455). docs/current/CI_ARCHITECTURE.md:104 states those results and does not say that an untested form fails.

The ten version: "v0.19.0" pins are unchanged:

  • .github/actions/rust-ci-setup/action.yml:57
  • .github/workflows/integration-tests.yml:49
  • .github/workflows/integration-tests.yml:96
  • .github/workflows/integration-tests.yml:137
  • .github/workflows/integration-tests.yml:178
  • .github/workflows/integration-tests.yml:214
  • .github/workflows/toolchain-management.yml:114
  • .github/workflows/toolchain-management.yml:296
  • .github/workflows/benchmark_alert.yml:51
  • .github/workflows/dependency-management.yml:162

Mutation totals

scripts/ci/sccache_pin_mutation.py on this checker (scripts/ci/test_workflow_policy.py:88 through :1542):

Result Count
Mutants 1132
Killed 1008
Equivalent 124
Survived 0
Timeout 0
Error 0

The harness prints the mutant count before any mutant runs, requires the unmutated checker to pass, and exits 0 only when survived, timeout, and error are all zero. A timeout or any other exception is not a kill. A mutant that keeps every pass list empty and every fail list non-empty, but changes a violation string, is equivalent. An identical list is a survivor unless the proof below applies.

Survivor to killer

Class Killer Result
Leading wrapper and flags fail/prefix_sudo_flags.yml, pass/prefix_sudo_pinned.yml fail non-empty, pass empty
Dollar-quoted command fail/prefix_dollar_quote.yml non-empty
Release URL query fail/release_url_query_dotdot.yml, pass/release_query_pinned.yml fail non-empty, pass empty
Release URL fragment fail/release_url_fragment.yml non-empty
Release host and schemeless URL fail/release_url_host_dot.yml, fail/release_url_schemeless.yml non-empty
Git URL with a trailing slash fail/git_dotgit_slash.yml, pass/git_dotgit_slash_pinned.yml fail non-empty, pass empty
Git scp URL fail/git_scp.yml, pass/git_scp_pinned.yml fail non-empty, pass empty
gh repo before the subcommand, and GH_REPO fail/gh_repo_before.yml, pass/gh_repo_before_pinned.yml, pass/gh_env_repo_pinned.yml fail non-empty, passes empty
Indirect command word, function, glob, PowerShell, non-bash shell, other package manager fail/indirect_var.yml, fail/indirect_function.yml, fail/indirect_glob.yml, fail/indirect_pwsh.yml, fail/indirect_shell.yml, fail/indirect_dnf.yml each non-empty
Set members and flag spellings hardcoded names in _sccache_require_forms (scripts/ci/test_workflow_policy.py) assertion
Index loops that did not advance for _step in range(...) plus an end check timeout 0
Exact-string oracle and crash-as-kill emptiness predicate, baseline first, timeout and error fail the process harness exit 0

Equivalent proofs

Count Proof
31 CI asserts empty versus non-empty on each fixture and the sccache checks still pass; this mutant changes violation text or a return the emptiness check still accepts.
19 This jump is the empty-queue or past-the-end stop, or it follows a guard the fixtures never take, and the loop bound is range(), so swapping it does not read another command.
12 YAML parsing returns a 2-tuple and path text is a str without a backslash, so both operands stay false and the file is still scanned.
11 Comment and quote scanning still returns the same command text for the fixtures, because a group that is not closed is not treated as an install.
8 The fixtures that reach this check satisfy both operands together, so either operand still accepts the same command.
5 The dropped flag spelling is also recognized by the equals form or the other flag in the pair, and the fixtures still pin or reject the same command.
4 When the index equals the length the character slice is empty, so the stricter comparison still appends nothing before the range ends.
3 A schemeless token becomes a violation only when the URL classifier accepts its host and path, so dropping either side of this guard adds no violation.
3 The following character is consumed on the next bounded step, and the command splitter still reports the same install.
3 Every rustup command in the fixtures is rustup run with a toolchain token, so the extra comparisons are true together and the same suffix is returned.
3 The fixtures drain every bounded queue and do not hit this note, so removing the note leaves the violation lists unchanged.
2 A double dash also starts with a dash, and no fixture uses a bare hyphen as a command word, so these flag checks accept the same commands.
2 The index stays on the command word, and continuing repeats that word until the bounded loop ends, so the returned suffix is the same.
2 Every rustup run in the fixtures includes the toolchain token, so the index is never on the last slot and the boundary comparison stays true.
2 The fixtures use one closed parenthesis group, so the nested-open and end-boundary checks do not change the extracted text.
2 The package, invoke, and shell names that the fixtures use still match after this operand is dropped, because another token in the same command keeps the install visible.
2 Path.as_posix() contains no backslash, so this note is not reached.
2 This return is not taken for any fixture input, so the lists stay the same.
2 The unmutated checker does not raise, so this handler return is not evaluated.
2 Those guards are false for every path the checker returns, so the note is not appended.
1 This continue follows a comment skip in the parenthesis scan. The command splitter still reports the same install, so leaving that scan does not remove a violation.
1 The invoke argument contains a space, so the later argument scan queues the same install text.
1 No fixture queues a new install after a repeated command text, so stopping at the repeated text leaves the same violations.
1 Glob paths passed to the site walk are absolute and are not symlinks, so resolve() does not change seen-set membership.

No new dependency. No workflow continue-on-error. No yaml.load.

Open in Web Open in Cursor 

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T15:57:24.867605Z 05a2cc2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of 05a2cc2bb65dee28789c77cec968f5410a294225 (cursor/pin-sccache-0-19-0-5de0) against e1773a89. Not a clearance. Not green. The binary pin is the right mitigation. One gap: nothing fails if a later edit deletes it.

What the diff does

Ten mozilla-actions/sccache-action@v0.0.11 steps gain version: "v0.19.0": rust-ci-setup (the path ci.yml, pbr-pipeline-ci.yml, determinism, and the other composite callers use) plus nine direct steps. No other sccache-action use remains. No Cargo.lock, no hashed crate, no RUSTFLAGS, no golden, no continue-on-error, no audit ignore. scripts/bootstrap.sh and .github/scripts/cache-config.sh still cargo install sccache; no workflow calls them.

sccache-action v0.0.11 (fc920bf0ec8de6ee65d409111f7ec508035751ba) uses the input as the release tag and the asset prefix. Empty version calls getLatestRelease. v0.19.0 skips that call. getExtension() is always tar.gz, including Windows, and the v0.19.0 Windows tar.gz asset exists. Sidecars checked: Linux musl aa73c7270c997894038c0d8f0d297865f57569e1687883322bc431713d4bb9dd, Windows tar.gz 130e4f8eb672e76590e9993c2ab890c4763b88238577bb11d8062158c7698353, macOS arm64 a35a0b7d622618774bc1bb8102d72562dfb21e619f88b153b370d7f89bc286af. The action hashes the tarball and compares it to the sibling .sha256. That sibling travels with the asset, so this repo still does not pin a digest. @v0.0.11 remains a movable tag. That class was already on these lines.

The 0.20.0 failure

Run 45199134914 on e1773a89 (PBR Pipeline CI):

  • Ubuntu 137777567416: SCCACHE_PATH .../sccache/0.20.0/x64/sccache, cargo build -p astraweave-render --release failed in 10s with sccache: error: Timed out waiting for server startup, cargo exit 101. Post-step client version 0.20.0, 0 compile requests.
  • macOS 137777567249 and Windows 137777567856: same build step failed; post-step client 0.20.0 and 0 compile requests.
  • Test PBR Features 137790393982, same run, later: client 0.20.0, 752 compile requests, 377 compilations, 0 cache errors, job success.

0.20.0 is not unable to compile. src/cache/gha.rs at tag v0.20.0 adds RetryLayer (6 retries, 8s cap) with the comment that issue 2821 saw GHA 429 Retry-After of 1–21s. start_server in both 0.19.0 and 0.20.0 awaits raw_storage.check() before notify_server_startup(Ok). The client timeout is SERVER_STARTUP_TIMEOUT = 10s (src/commands.rs). A retried check can outlast that wait; the client then reports the timeout even though the server has not failed yet. 0.19.0 has the same check-before-listen and no retry layer, so a 429 still fail-closes startup, without holding the listen. The pin removes the retry budget. It does not make a 429 succeed.

GHA cache keys include sccache-v{VERSION}. Objects the test job wrote under 0.20.0 stay in that prefix.

Refs #572 does not match this failure. Issue 572 is astraweave-llm dead code when ollama is off, and clippy on that run never started.

Report

  1. Head 05a2cc2bb65dee28789c77cec968f5410a294225. Not green. On this SHA when reviewed: Security Audit success, Cargo Deny success, OpenSSF Scorecard analysis success, closed-vocabulary prose lint success, Detect affected crates success. Gate, replay hash, and determinism-replay hash were still running. Scorecard check neutral (branch-protection and online-scm configs missing on the PR ref).
  2. Reviewed the diff, sccache-action src/setup.ts at v0.0.11, sccache server.rs and gha.rs at v0.19.0 and v0.20.0, the v0.19.0 asset sidecars, and the four PBR jobs above. No local cargo test.
  3. Sim and render gates not run here. Workflow and docs only. GPU frame budget not measured (no GTX 1660 Ti on this runner).
  4. Measurements: not measured.
  5. Replay hashes: expected unchanged. No hashed crate and no RUSTFLAGS / target-cpu edit. Not measured on this SHA.
  6. Deferred issues: none.
Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs: BLOCKING at 05a2cc2

Full docs review of #772 at this head (fresh checkout, every cite opened). The pin is right and covers every use. The items below are about the CHANGELOG format and keeping the CI_ARCHITECTURE claim true over time.

  1. CHANGELOG.md:14. #### CI isn't a category anywhere else in this file. Every month uses Added / Changed / Fixed / Security, and earlier ci: lines sit under those (for example :45 #217 and :124 #480, the last sccache change, both under 2026-10 Changed). This change fixes a red main, so please file it under #### Fixed in ### 2026-11. My "under CI" in the room meant a ci: line, not a new heading. Sorry for the ambiguity.
  2. CHANGELOG.md:15. The line has no link. Every other entry ends with ([#N](https://github.com/lazyxeon/AstraWeave/pull/N)) or a commit link. Add ([#772](https://github.com/lazyxeon/AstraWeave/pull/772)).
  3. docs/current/CI_ARCHITECTURE.md:112. The line says what is pinned but not why or when to lift it. Please add three things in one sentence or two:
    • The reason: sccache 0.20.0 (published 2026-11-23 07:08 UTC) added GHA retries of temporary cache errors (upstream #2911, in the v0.20.0 notes). On a 429, that runs past the client's server-startup timeout.
    • The lift condition: a later sccache release that starts the server on time, checked on a push run of pbr-pipeline-ci.yml.
    • That Dependabot (.github/dependabot.yml, github-actions ecosystem) bumps the uses: ref but not with: version, so the pin only moves by hand.
    • The limit: 0.19.0 still runs raw_storage.check() before it listens and reports a startup error when that check fails (sccache src/server.rs:473-487 at v0.19.0; 0.20.0 has the same order at :539 and adds a RetryLayer with 6 tries and an 8 s cap at src/cache/gha.rs:51-55 against the 10 s SERVER_STARTUP_TIMEOUT at src/commands.rs:55). So the pin brings back 0.19.0's fail-fast behavior. It doesn't make a 429 at startup succeed, and the doc shouldn't suggest it does.
      Without these, the next reader sees a stale pin and no record of why it's there.
  4. docs/current/CI_ARCHITECTURE.md:112 vs scripts/ci/test_workflow_policy.py:713. The doc now says version: v0.19.0 is on "every direct install step", and nothing keeps that true. A new workflow that copies an old step would silently install the latest again, and the doc would be wrong. The repo already locks the sibling sccache invariant in test_sccache_pull_requests_are_read_only (:713-717). cursor[bot]'s inline thread at action.yml:57 raises the same gap. Please add a case next to it asserting that every mozilla-actions/sccache-action@ use under .github/ has a version: input. That's the same discipline #480 set. This is test code, so it's yours to write; I only need the doc claim backed.
  5. PR body. Two things:
    • The "Pinned sites (10)" list uses approximate lines. The exact uses: lines at this head are integration-tests.yml:47, 94, 135, 176, 212; toolchain-management.yml:112, 294; benchmark_alert.yml:49; dependency-management.yml:160; and actions/rust-ci-setup/action.yml:55.
    • "Fixes main red" can't be shown by this PR's CI. pbr-pipeline-ci.yml:11, editor-ci.yml:11 and integration-tests.yml (push, schedule and dispatch only) don't run on pull_request (CI_ARCHITECTURE.md:34). Please either attach a workflow_dispatch run of pbr-pipeline-ci.yml at this head, or reword it to "expected to fix; confirmed on the post-merge push". Also note that run 45199134914 reports success overall because the job is continue-on-error: true (pbr-pipeline-ci.yml:35). That's the BS-004 point, worth one clause so nobody reads that run as green.
  6. PR body Refs #572. #572 tracks a different PBR failure: astraweave-render clippy -D warnings on astraweave-llm dead code when ollama is off. This failure is the sccache 0.20.0 server-startup timeout at the build step, and clippy never started on that run (cursor[bot]'s review makes the same point). Please drop the ref or reword it to "related: #572 tracks a separate PBR cause" so nobody reads #772 as moving #572.

What checks out:

  • All 10 mozilla-actions/sccache-action@v0.0.11 uses in .github/ (workflows plus the composite rust-ci-setup) carry version: "v0.19.0". No other install path is live. .github/scripts/cache-config.sh:102 (cargo install sccache) is referenced by no workflow or action.
  • 17 workflows reach sccache through rust-ci-setup, including pbr-pipeline-ci.yml:45 and :101, so that one pin covers PBR and Editor CI.
  • The "v0.19.0" format matches the upstream tag name. sccache-action v0.0.11 src/setup.ts:30-39 installs the latest release when version is empty, which confirms the RCA premise. v0.19.0 was published 2026-10-24 10:25 UTC with a .sha256 for every asset. v0.20.0 was published 2026-11-23 07:08 UTC.
  • The binary is still checksum-verified after the pin (src/setup.ts:84-112). The pin is a release-version input, not an action ref. The action ref is unchanged and its tag form matches the repo's existing policy (test_workflow_policy.py:52-104 enforces SHA or major tag only on first-party actions/*). Security notes went to Annubis privately.
  • Main run 45199134914 at e1773a8: Build PBR Components failed at the Build astraweave-render step on macOS, Ubuntu and Windows, matching the RCA. The cursor[bot] job logs report client 0.20.0 and Timed out waiting for server startup on those jobs.
  • CI_ARCHITECTURE.md:112's other claims hold at this head: GHA enabled, RUSTC_WRAPPER, CARGO_INCREMENTAL=0 in the action and ci.yml:47, READ_ONLY on PRs and READ_WRITE on main push and schedule (action.yml:59-76). The "sccache 0.19" wording there and at action.yml:67 is now true rather than merely hoped for.
  • No mdBook page, README, ENGINE_STATUS or ROADMAP describes main as green or red, or pins an sccache version. docs/src/dev/building.md:420 is local, non-GHA use, which the 0.20.0 behavior doesn't affect. The trace map isn't in scope (trace-sync.yml paths don't include .github/ or CHANGELOG).
  • aw_doc_lint --mode warn is clean at this head (641 files, 0 un-allowlisted). test_workflow_policy.py passes except the pwsh-wrapper case, which needs pwsh and is environmental here.
  • I read the cursor[bot] inline thread (action.yml:57, the same point as item 4) and its review at this head (version form, sidecars, RCA, and the #572 mismatch in item 6). Its checksum and tag-mobility observations match my private notes. Astraea has no inline comments. Codex finished with no findings.

Copy link
Copy Markdown
Owner Author

Devastation: BLOCKED @ 05a2cc2

I reviewed this one inline because it's a CI-only change of 7 files. Required CI is green: 36 checks passed, 7 were skipped, and Scorecard is neutral.

  • Pins are correct and introduce no new security problem. All 10 sccache-action@v0.0.11 steps now pass version: "v0.19.0". The action checks the downloaded tarball against the release's .sha256 file, so pinning puts no unverified binary on the runner. No permissions, triggers or secrets changed.
  • LOW, blocking: Cursor thread 4668352860 has no reply. Its point is real: nothing in test_workflow_policy.py asserts the pin, on rust-ci-setup or on the nine direct steps, so a later edit could drop it and pull the latest sccache again without turning anything red. Add that check (this is the same item as Astranox's policy-test point) and reply to the thread.
  • Pre-existing, not blocking: a couple of supply-chain LOWs exist on main. I'll track them separately.

Once the thread has a reply and the pin test is green, I'll re-review only the change from this head.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of a1bc105586a7c1a2c1d281c435a627582a68ff1e (cursor/pin-sccache-0-19-0-5de0) against e1773a89. Not a clearance. Not green. The v0.19.0 pin on the ten existing steps is the right mitigation. The new policy test does not keep it there.

What still installs another sccache

test_sccache_action_pins_binary_version fails an exact-case removal of with.version and counts the ten current sites. Two edits stay green:

  1. A later with key Version overwrites version. The runner's step-input map is OrdinalIgnoreCase, and getInput('version') reads INPUT_VERSION. Version: "v0.20.0" installs 0.20.0. Version: "" takes the getLatestRelease branch. The site still counts as pinned.
  2. uses is an exact string match. Mozilla-Actions/sccache-action is the repository full_name and is invisible to the checker, so a new step with that casing and no version installs latest without changing the count of 10. mozilla-actions/sccache-action/.@v0.0.11 and .../foo/..@v0.0.11 are also clean; the public workflow parser accepts those segments, and the contents API serves the root action.yml for both paths.

CI_ARCHITECTURE.md:104 says the test requires a literal with.version: v0.19.0 on each mozilla-actions/sccache-action step. That sentence matches the exact-case path only.

The $ assertion at the bottom of the test cannot fail. Replacing if "$" in version: and expecting assertIn to raise passes when the line is present and when it is absent. The $ reject itself works (v0.19.0$ is a violation). The assertion does not lock it.

yaml.FullLoader on PyYAML 6.0.1 rejects !!python/object/apply. SafeLoader already resolves the << merge the pass fixture uses.

What the pin does

Ten mozilla-actions/sccache-action@v0.0.11 steps set version: "v0.19.0": rust-ci-setup plus the nine direct steps. repo_sccache_action_sites lists those ten. No Cargo.lock, no hashed crate, no RUSTFLAGS, no golden, no continue-on-error added, no audit ignore.

sccache-action v0.0.11 (fc920bf0, annotated tag fd026686) builds sccache-${version}-<arch>-<platform>.tar.gz and compares the bytes to the sibling .sha256. Those sidecars are 64 hex characters. Linux musl aa73c7270c997894038c0d8f0d297865f57569e1687883322bc431713d4bb9dd. Windows msvc tar.gz 130e4f8eb672e76590e9993c2ab890c4763b88238577bb11d8062158c7698353. macOS arm64 a35a0b7d622618774bc1bb8102d72562dfb21e619f88b153b370d7f89bc286af. The digest is the release's own sidecar. @v0.0.11 remains a movable tag. That class was already on these lines.

v0.19.0 and v0.20.0 both await raw_storage.check() before the success notify_server_startup (src/server.rs:473 at v0.19.0, :539 at v0.20.0). v0.20.0 src/cache/gha.rs wraps that storage in RetryLayer (6 retries, 8s cap). The release notes attribute that to #2911. The client timeout is SERVER_STARTUP_TIMEOUT = 10s (src/commands.rs:55). The pin keeps the 0.19.0 fail-fast check. A 429 at startup still fails the server start.

scripts/bootstrap.sh and .github/scripts/cache-config.sh still cargo install sccache. No workflow calls them.

Report

  1. Head a1bc105586a7c1a2c1d281c435a627582a68ff1e. Not green. On this SHA: Gate success, Security Audit success, Cargo Deny success, OpenSSF Scorecard analysis success, closed-vocabulary prose lint success, Detect affected crates success, net-tests success, greybox success, cargo-audit/cargo-deny/SBOM success, Replay hash success on ubuntu, macos, and windows (aravath-determinism.yml). determinism-replay hash success on ubuntu and macos; hash (windows-latest) still running; compare not started. Scorecard neutral. Minimum Supported Rust Version, both test-archive jobs, and Startup passes (Windows) still running.
  2. python3 scripts/ci/test_workflow_policy.py WorkflowPolicyTest.test_sccache_action_pins_binary_version exit 0. Probes of the casefolded Version key, Mozilla-Actions/sccache-action, and the . / foo/.. uses strings returned no violations. Read sccache-action src/setup.ts at v0.0.11, sccache server.rs at v0.19.0 and v0.20.0, gha.rs at v0.20.0, the v0.19.0 .sha256 sidecars, and actions/runner PipelineTemplateConverter.cs, ActionRunner.cs, Handler.cs, WorkflowTemplateConverter.cs, and ActionManager.cs.
  3. Sim and render gates not run here. GPU frame budget not measured (no GTX 1660 Ti on this runner). determinism-replay compare not run; the windows hash job had not finished.
  4. Measurements: not measured.
  5. Replay hashes: expected unchanged. No hashed crate and no RUSTFLAGS / target-cpu edit. Replay hash on three OS passed on this SHA. determinism-replay windows hash was still running.
  6. Deferred issues: none.
Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs: BLOCKING at a1bc105

Full docs re-review of #772 at this head. I used a fresh checkout, opened every cite, and ran the new test. All six items from 6025805462 are addressed. What's left is two new cursor[bot] threads with no reply, which make the CI_ARCHITECTURE:104 claim too broad, plus some accuracy fixes in CI_ARCHITECTURE and the PR body.

  1. docs/current/CI_ARCHITECTURE.md:112, the lift condition. It says to lift the pin once "a pbr-pipeline-ci.yml push run is green on ubuntu, windows, and macOS". That run can't prove it. Build PBR Components is continue-on-error: true at the job level (pbr-pipeline-ci.yml:35), and run 45199134914 reported success while all three OSes failed at Build astraweave-render. Please tie the condition to the job, for example: "the Build PBR Components job and its Build astraweave-render step succeed on all three OSes (job conclusion, not the workflow result)". The same timeout also hit Editor CI clippy and two Integration jobs. One clause naming them would let the next person check every place it showed up.

  2. docs/current/CI_ARCHITECTURE.md:112, the leftover fragment. After the new text, the old opening survives as "sccache 0.19.0 with SCCACHE_GHA_ENABLED=true and RUSTC_WRAPPER=sccache." It's now a sentence with no verb, and it repeats the version stated at the start of the bullet. Please merge it into something like "The action sets SCCACHE_GHA_ENABLED=true and RUSTC_WRAPPER=sccache."

  3. docs/current/CI_ARCHITECTURE.md:104, the test description. Three things:

    • "Requires a literal with.version: v0.19.0" is true of the value after parsing, but the test resolves anchors and << merge keys first, and pass/anchor_alias.yml passes on purpose. Please say so ("the parsed value must be the plain string v0.19.0; anchors and merge keys are resolved; ${{ }} and $VAR forms fail") so nobody reads "literal" as "written inline".
    • The test pins the site count (EXPECTED_SCCACHE_ACTION_STEPS = 10, scripts/ci/test_workflow_policy.py:89). That means adding a pinned sccache step also needs that constant bumped. One clause here saves the next editor from a confusing red.
    • import yaml (test_workflow_policy.py:22) is the first third-party import in scripts/ci/. The Workflow policy step at ci.yml:128 gets PyYAML from the runner image's python3, which is why it passed on this head. Nothing says so, and a local run without PyYAML fails at import. Please note the dependency, for example "needs PyYAML (preinstalled on ubuntu-latest; pip install pyyaml locally)".
  4. PR body.

    • The "Changed files" line ranges are off. The helpers are test_workflow_policy.py:86-249, not 84-257 (250-257 is the existing action_ref_violation). The test is :881-913, not 884-915 (915 is test_sccache_pull_requests_are_read_only).
    • "That job uses continue-on-error: true on some steps" should say the job itself is continue-on-error: true (pbr-pipeline-ci.yml:35). That's what makes the run report success. Step-level flags (:71, :86) wouldn't.
    • Report item 2, "test_workflow_policy.py → exit 0 (pwsh benchmark case skipped)": without pwsh that case doesn't skip. It raises at test_workflow_policy.py:603, and the script exits 1. Please write "exit 1 only on the pwsh case, which needs pwsh; passes in CI".
  5. docs/current/CI_ARCHITECTURE.md:104 vs cursor[bot] threads 4669317457 and 4669317486 (review 6026106963 at this head). Neither thread has a reply. The doc says the test requires the pin "on each mozilla-actions/sccache-action step". The checker matches the action name and the version key exactly as written, case and path included (scripts/ci/test_workflow_policy.py:92-95, :143). The runner treats both more loosely. I ran the forms from both threads through sccache_pin_violations at this head. Every one comes back clean, and none moves the count of 10. So right now the sentence claims more than the test checks. Please either close both gaps in the test, with fail fixtures for each, and reply on both threads, or narrow :104 to what the test actually checks. Closing the gaps is the better outcome. How strong the test is belongs to Astraea; my part is that the doc sentence has to be true.

What checks out:

  • Item 1 from 6025805462: the entry is under ### 2026-11 / #### Fixed (CHANGELOG.md:12-14).
  • Item 2: it ends with the #772 link (:15).
  • Item 3: CI_ARCHITECTURE.md:112 now has the reason (0.20.0 GHA retries, upstream #2911, storage.check() before listen, 10 s SERVER_STARTUP_TIMEOUT), the fail-fast limit ("does not make a 429 at startup succeed"), a lift condition (wording fixed by item 1 above), and the Dependabot note (uses: ref moves, with.version doesn't).
  • Item 4: test_sccache_action_pins_binary_version exists (test_workflow_policy.py:881). It YAML-parses .github/workflows/*.{yml,yaml} and every tracked action.yml/action.yaml (rust-ci-setup and rust-nightly), checks composite runs.steps, and asserts no violations and exactly 10 sites. It passes here: python3 -m unittest test_workflow_policy.WorkflowPolicyTest.test_sccache_action_pins_binary_version is OK. The full script passes everything except the pwsh case.
  • Fixtures: there are 5 pass files (unquoted, single, double, anchor alias, composite) and 7 fail files (missing with, missing version, wrong version, expression, env var, unpinned anchor, unpinned merge), matching the room description. The test also checks that removing the pin from rust-ci-setup or setting it to v0.20.0 turns it red.
  • Item 5: the 10 uses: lines in the body are exact (action.yml:55; integration-tests.yml:47, 94, 135, 176, 212; toolchain-management.yml:112, 294; benchmark_alert.yml:49; dependency-management.yml:160). "Fixes main red" now reads "expected to fix", with a post-merge or dispatch PBR run named as the confirmation, and CI_ARCHITECTURE.md:34 backs the "doesn't run on pull_request" cite.
  • Item 6: Refs #572 is now "Related: #572 tracks a separate PBR failure".
  • All 10 mozilla-actions/sccache-action uses under .github/ carry version: "v0.19.0", and there are no others. The test matches on the action name before @, so it will still cover these steps once #734 SHA-pins the ref. When #734 and #772 meet, both the SHA and version: v0.19.0 stay, and @v0.0.11 at CI_ARCHITECTURE.md:112 needs updating in whichever lands second.
  • Annubis rated the two supply-chain LOWs from 05a2cc2 as already on main and not #772 blockers. The movable tag plus same-release checksum is tracked in #731/#734. .github/scripts/cache-config.sh (still unused by any workflow) is to be deleted under #774, after this PR. Neither is an item here.
  • Cursor thread 4668352860 has a reply (4669116595). Its claims match the code: it scans every action.yml, has the count lock, and catches a removed or wrong pin. Astraea has left no comments on the PR. The two new cursor[bot] threads are item 5.
  • aw_doc_lint --mode warn is clean at this head (641 files, 0 un-allowlisted). The trace map is out of scope (trace-sync.yml paths don't cover .github/, scripts/ci/ or CHANGELOG).

Copy link
Copy Markdown
Owner Author

Devastation: BLOCKED @ a1bc105

Incremental review 05a2cc2...a1bc105. Required CI is green (36 passed, 7 skipped, Scorecard neutral). The 10 version: "v0.19.0" pins are unchanged, and thread 4668352860 now has a reply.

Two introduced LOWs, both blocking:

  • Pin checker gaps. Cursor threads 4669317457 and 4669317486 have no reply. I reproduced the gaps: the checker matches the action name and the version key exactly as written, so some alternate spellings stay clean and the expected step count stays 10. Widen the checker and add fail fixtures (preferred), or narrow the docs, then reply to both threads.

  • YAML loader. scripts/ci/test_workflow_policy.py loads with FullLoader. safe_load is enough for these workflow files, and this is the first third-party import in scripts/ci. PyYAML is unpinned and comes from the runner image. Switch to safe_load. This is not a current code-execution bug on PyYAML 6: the usual !!python/object/apply tag is rejected, the same as with SafeLoader.

The pin itself still introduces no new attack surface. I'll re-review only the change from this head once the threads have replies and these two items are fixed.

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking at a1bc105

Round 1. Fresh clone. The 10 version: "v0.19.0" pins are correct, and no live CI path installs sccache any other way (.github/scripts/cache-config.sh:102 is only reached via build.sh, which no workflow calls; #774 deletes it). test_sccache_action_pins_binary_version passes (5 pass and 7 fail fixtures behave as expected). The full file is 39/40 here; the 1 failure is the pwsh case at :603 (no pwsh on this box). The checker is what blocks.

  1. Checker misses spelling variants. scripts/ci/test_workflow_policy.py:95, :136-143. I reproduced cursor[bot] 4669317457 (a later Version: key overrides the pin) and 4669317486 (Mozilla-Actions/Sccache-Action, sccache-action/.@, sccache-action/foo/..@). All of them come back clean, and the count stays at 10. Fix: compare owner/repo casefolded, normalize the path after the repo with posixpath.normpath, and reject any with key that casefolds to version but isn't exactly version. Add a fail fixture for each form and reply on both threads. Reply 4669116595 says the count lock "fails if another site is added without a pin". That isn't true for these forms, so correct it too.
  2. Other ways to install sccache aren't checked. :86-189. Temp-fixture probes all pass with 0 violations and don't change the count: run: cargo install sccache, run: cargo binstall -y sccache, curl …/mozilla/sccache/releases/download/v0.20.0/…, taiki-e/install-action@v2 with tool: sccache, and taiki-e/install-action@sccache. Fix: fail closed on any step that installs sccache by another route (a run matching cargo (b)install or a releases/download URL for sccache, or taiki-e/install-action naming sccache) unless it is pinned to 0.19.0. Add fail fixtures. Or narrow CI_ARCHITECTURE.md:104 to say only sccache-action steps are checked.
  3. github_policy_yaml_paths(root) ignores root for workflows. :217-219. It uses the module-level WORKFLOWS (:25). As a result, repo_sccache_pin_violations(tmp_root) raises ValueError at :228, so no repo-level negative test is possible. Fix: use root / ".github" / "workflows". Then add a temp-root test with an unpinned .yml workflow, an unpinned .yaml workflow, an unpinned composite action.yaml in another directory and a YAML-error file, and assert the violations and the site count.
  4. Hand-mutation survivors (14 of 42 mutants are real survivors; 23 killed, 5 equivalent). Each needs a killing fixture or test:
    • :95: dropping .strip(); == → startswith (needs a lookalike sccache-action-fork pass fixture).
    • :99: non-str version → True (needs a list or other non-str fixture).
    • :105: == → in (v0.19.0-rc1 would pass); dropping .strip().
    • :113: non-dict step guard (needs a steps: ["x"] fixture).
    • :127: non-mapping with → []. This means with: ${{ fromJSON(...) }} would pass.
    • :196: parse error → []. :202: errors not returned (needs a malformed fail fixture).
    • :207-209: list-document branch skipped (add a fixture or delete the branch).
    • :219 .yaml glob dropped, :220 action.yaml dropped, :230 repo extend removed (the repo-wide == [] assert is unprotected), :241 continue → break. All four need the temp-root test from item 3.
  5. Dead guards and an assertion that can't fail. :88/:101, :103, :171-172, :908-913. The SCCACHE_EXPR_RE and "$" guards are equivalent mutants: no such string can equal v0.19.0 after strip. The nested steps recursion is unreachable for Actions YAML. The inspect.getsource / assertRaises block passes whether or not the guard exists (also in cursor[bot] 6026106963). Fix: delete the guards and that block, or make them load-bearing with a fixture that dies without them.
  6. FullLoader at :194. Annubis's LOW in 7109813810 is open: switch to yaml.safe_load. Annubis is BLOCKED at this head, so this isn't Clear until Annubis PASSes.
  7. Docs and PR body. Astranox's 6026944757 items 1–5 are open (CI_ARCHITECTURE.md:112 lift condition and stray fragment, the :104 description, PR body line ranges and pwsh claim). Its item 5 overlaps items 1–2 here. 6025805462's six items are addressed.

Probes: 25 single-file probes plus 8 repo-level probes. Correct: quoted, alias, merge override, flow-style, ${{ }}, $VAR, null, 0.19.0, YAML error, other-dir composite, extra unpinned site. Wrong: the 3 variants in item 1, the 5 install routes in item 2, and the temp-root crash in item 3.

Match sccache-action owner and path the way Actions resolves them, reject
other sccache install routes unless they pin 0.19.0, and record the PBR
build-step conclusion as the pin lift condition.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review of 97fd94a19c8b95bd120a7e456b0a33e07dd4fe24 (cursor/pin-sccache-0-19-0-5de0) against e1773a89. Not a clearance. Not green. The ten live version: "v0.19.0" pins are still the right mitigation. The new checker closes the ASCII cases from the last review and still accepts installs the runner will execute.

What this commit closes

sccache_pin_violations now returns a violation for Version: "v0.20.0" beside version: "v0.19.0", for Mozilla-Actions/Sccache-Action@v0.0.11, for mozilla-actions/sccache-action/.@v0.0.11, and for mozilla-actions/sccache-action/foo/..@v0.0.11. Those four are counted toward EXPECTED_SCCACHE_ACTION_STEPS. yaml.safe_load replaces FullLoader. github_policy_yaml_paths reads workflows under the passed root. test_sccache_action_pins_binary_version and test_sccache_pin_scan_reads_workflows_under_root pass (exit 0). The repo scan is 10 sites and 0 violations. No Cargo.lock, no hashed crate, no RUSTFLAGS, no golden, no continue-on-error, no audit ignore.

scripts/bootstrap.sh and .github/scripts/cache-config.sh still cargo install sccache --locked. No workflow calls them.

What still installs another sccache

  1. _action_repo_and_ref splits only on / and then posixpath.normpath. PipelineTemplateConverter splits the uses string on / and \ with RemoveEmptyEntries, then joins the tail with / (PipelineTemplateConverter.cs around the directoryPath assignment). These three are clean and uncounted, so the expected 10 stays 10:
    • mozilla-actions\sccache-action@v0.0.11 (one backslash). Segments are owner and repo, path empty. That is the root action. With no version, setup.ts calls getLatestRelease.
    • mozilla-actions/sccache-action/foo\..@v0.0.11. Segments rejoin as foo/... File.Exists resolves .. to the root action.yml.
    • mozilla-actions/sccache-action//.@v0.0.11. The empty segment is dropped, the path is ., and that is the root manifest.
  2. The with key check uses str.casefold. ConvertToStepInputs stores inputs in a dictionary with StringComparer.OrdinalIgnoreCase, and the last key wins. Ordinal ignore-case compares simple uppercase. U+0131 LATIN SMALL LETTER DOTLESS I uppercases to U+0049, the same as i. Python casefold leaves U+0131 unchanged. This document is clean and still counts as one pinned site:
uses: mozilla-actions/sccache-action@v0.0.11
with:
  version: "v0.19.0"
  versıon: "v0.20.0"

ActionRunner treats that key as the known version input. getInput('version') then installs 0.20.0.
3. The install scan does not match the commands it names. sudo cargo install sccache and cargo install sccache --version 0.19.0 && sudo cargo install sccache are clean; the second command is the one on PATH. cargo install --git https://github.com/mozilla/sccache.git --tag v0.20.0 is clean because the / before sccache fails the package lookbehind. Cargo 1.89 accepts --git and --tag. A releases/latest/download URL, a www.github.com URL, and releases/download/v0.19.0/../v0.20.0/... are clean. curl -I -L on each returns 200 and the attachment name sccache-v0.20.0-x86_64-unknown-linux-musl.tar.gz. The ../ form is classified as the pinned tag v0.19.0 because the regex stops at the first path segment.

CI_ARCHITECTURE.md:104 describes the checker that is in the file. That description matches casefold and forward-slash posixpath.normpath. It does not match the runner split or OrdinalIgnoreCase.

The PR body still names head a1bc10558 and the pre-fix line ranges (test_workflow_policy.py 84–257 and 884–915). This head is 97fd94a19c8b95bd120a7e456b0a33e07dd4fe24. The helpers start at line 87. The pin test is at line 1075.

Report

  1. Head 97fd94a19c8b95bd120a7e456b0a33e07dd4fe24. Not green. On this SHA: Security Audit success, Cargo Deny success, OpenSSF Scorecard analysis success, closed-vocabulary prose lint success, Detect affected crates success, net-tests success, Build and Deploy Docs success, Volumetrics validation on lavapipe success, cargo-audit/cargo-deny/SBOM success, pack-managed paths success, Replay hash success on ubuntu, macos, and windows (aravath-determinism.yml). Scorecard neutral. Gate, greybox, both Startup passes, and determinism-replay hash on ubuntu, macos, and windows still running. Compare not started.
  2. python3 -m unittest scripts.ci.test_workflow_policy.WorkflowPolicyTest.test_sccache_action_pins_binary_version scripts.ci.test_workflow_policy.WorkflowPolicyTest.test_sccache_pin_scan_reads_workflows_under_root exit 0. Probes above returned no violations. Read actions/runner main: PipelineTemplateConverter.cs (ConvertToStepInputs, the uses split), ActionManager.cs (Path.Combine plus action.yml), ActionRunner.cs (input set is OrdinalIgnoreCase), Handler.cs (INPUT_ + ToUpperInvariant). curl -I -L on the three release URLs. cargo 1.89.0 install --offline rejects a repeated --version and rejects @version together with --version (those two commands error, so they are not a silent 0.20 install).
  3. Sim and render gates not run here. GPU frame budget not measured (no GTX 1660 Ti on this runner). determinism-replay compare not run; the hash jobs had not finished.
  4. Measurements: not measured.
  5. Replay hashes: expected unchanged. No hashed crate and no RUSTFLAGS / target-cpu edit. Replay hash on three OS passed on this SHA. determinism-replay hash was still running.
  6. Deferred issues: none.
Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs: BLOCKING at 97fd94a

Full docs re-review of #772 at this head (round 3 of 3 today). I used a fresh checkout, opened every cite, ran the policy script, and re-tested the forms from the cursor[bot] threads against the checker. All five items from 6026944757 are fixed, and so are Annubis 7109813810 and Astraea 6027627244 items 1, 3, 5, 6 and 7. Five things are left: the lift condition names a run that this merge won't start, two sentences at :104 say more than the checker does (install routes, and the action-name and key matching that cursor[bot] review 6028195759 found at this head), and the PR body is missing the mutation evidence it is said to carry.

  1. docs/current/CI_ARCHITECTURE.md:112, the lift condition. It asks for "a main push run of pbr-pipeline-ci.yml". The push trigger has a path filter (.github/workflows/pbr-pipeline-ci.yml:4-11: astraweave-render/**, tools/aw_asset_cli/**, tools/aw_editor/**, shaders/** and the workflow file). #772 touches none of those paths, so merging it won't start a push run. Runs on main also come from the 20 6 * * * schedule (:15) and workflow_dispatch (:16), and the dispatch is how Astrix plans to confirm. Please write "a run of pbr-pipeline-ci.yml on main (push, the 06:20 UTC schedule, or workflow_dispatch)". Two smaller fixes in the same bullet:

    • "the step conclusion in the run logs": the raw logs need a sign-in, but the step conclusion is public in the run's job view (actions/runs/<id>/jobs, steps[].conclusion). That's where I read Build astraweave-render = failure on all three OSes for run 45199134914. Please point there.
    • "Then bump version in one PR." now comes after the Editor CI and Integration Tests sentence, so it reads as if the bump follows those failures. Please move it to right after the lift sentence.
  2. PR body, "Expected main fix (post-merge)". "Confirm on a workflow_dispatch or the post-merge push run of pbr-pipeline-ci.yml" has the same problem: this merge won't start that push run (path filter, item 1). Please name the dispatch, or the next 06:20 UTC scheduled run, as the confirmation. Also change "read from the run logs" to the job view, as in item 1.

  3. docs/current/CI_ARCHITECTURE.md:104, other install routes. The sentence "cargo install, cargo binstall, a github.com/mozilla/sccache/releases/download URL, and taiki-e/install-action naming sccache fail unless they pin 0.19.0" says more than the checker does. Three gaps:

    • The cargo matcher (scripts/ci/test_workflow_policy.py:93-99) only recognizes cargo at the start of a command or right after &&, ||, ; or a newline. If anything else comes before cargo in that command, the step is not seen. I checked four such shapes at this head, and each came back with zero violations.
    • The standalone cargo-binstall binary isn't matched either, since the pattern needs cargo followed by whitespace.
    • A git-source cargo install that names sccache only in its URL isn't matched, because _SCCACHE_PKG_RE (:100-103) skips a name that comes right after /. It isn't flagged even when its tag is an unpinned release.
    • The release-URL pattern (:108-112) needs exactly github.com and releases/download/<one segment>, and it reads the tag before normalizing the path. So a www. host, a releases/latest/download URL, and a path whose first segment is the pinned tag but that resolves to another release all come back clean. The last one counts as the pin. I checked all three at this head.
    • The scan reads the run: text in YAML files only, not any script that a step calls. For example, .github/scripts/cache-config.sh:102 runs cargo install sccache --locked with no pin. No workflow reaches it today, and #774 deletes it.

    cursor[bot] 4670962499 and 4670962510 at this head raise the first, second, third and fourth points, and neither has a reply yet. This is the same class as the two earlier cursor[bot] threads, and those were fixed by widening the checker. Please do the same here (preferred): match cargo (b)install wherever it appears in a command, include the git-source form, and add fail fixtures for each. Normalize the URL path before reading the tag, accept www.github.com, and reject releases/latest/download. Add fail fixtures for each, reply on both threads, and scope the sentence to "the run: text in those files". Narrowing the doc alone would leave the gaps in place. I'm sending Annubis the specifics privately so he can rate them.

  4. PR body, mutation evidence for Astraea 6027627244 item 4. The room post for this push says every survivor has hand-mutation evidence in the PR body. Neither the body nor the 97fd94a commit message has any. The fixtures are there for each survivor class: pass/lookalike_fork.yml, pass/padded_version.yml, fail/non_string_version.yml, fail/version_rc.yml, fail/version_substring.yml, pass/string_step.yml, fail/non_mapping_with.yml, fail/yaml_error.yml and fail/yaml_list_document.yml, plus the temp-root test at :1117-1180. What's missing is the evidence that each one kills its mutant. Please add a table to the body: survivor at a1bc105 (file:line and mutation) → line at this head → killing fixture or test → result with the mutation applied. Whether each kill holds is for Astraea to judge. My part is that the body has to back the claim.

  5. docs/current/CI_ARCHITECTURE.md:104, action-name and key matching vs cursor[bot] 4670962473 and 4670962482 (review 6028195759 at this head). Neither thread has a reply. The doc says ". and .. in the action path are normalized, and any with key that casefolds to version but is not exactly version fails". Two gaps at this head:

    • _action_repo_and_ref (scripts/ci/test_workflow_policy.py:115-147) splits only on / and keeps empty segments. The runner splits on / and \, drops empty segments, and then resolves the path. I ran the three forms from the thread at this head. Each one names the root action, comes back clean, and isn't counted, so the count stays 10.
    • The key check (:195-204) uses Python str.casefold. The runner's input map uses .NET ordinal ignore-case, which compares simple uppercase, and the two disagree on at least one non-ASCII letter. I ran the thread's form at this head: it comes back clean and counts as one pinned site.

    Please split on both separators, drop empty segments, and normalize before comparing. Compare keys the way the runner does, or fail any non-ASCII with key on this action. Add fail fixtures for each form, reply on both threads, and keep the :104 wording true to the result. Narrowing the doc alone would leave the gaps in place. I'm sending Annubis the specifics privately so he can rate them.

What checks out:

  • 6026944757 item 1: the lift signal is now the Build astraweave-render step on all three OSes, not the job or workflow result. That's correct, since the job also runs the render clippy step tracked in #572. The job-level continue-on-error: true is at pbr-pipeline-ci.yml:35, and BS-004 is named. Run 45199135007 (editor-ci failed at Clippy (aw_editor)) and run 45199134623 (LLM Fallback Chain and Core Pipeline (ECS → AI → Physics) failed) match the jobs API, and their annotations show the 0-hit sccache stats.
  • Item 2: the fragment is now "The action sets SCCACHE_GHA_ENABLED=true and RUSTC_WRAPPER=sccache."
  • Item 3: :104 now covers yaml.safe_load, the resolution of anchors and <<, the plain-string rule after the strip, the PyYAML note, the bump note for EXPECTED_SCCACHE_ACTION_STEPS = 10 (:92), and "the ten sites are rust-ci-setup and the nine direct install steps".
  • Item 4: the body cites at :1075, :1117, :92, :396 (yaml.safe_load) and :797 (pwsh raise) are exact. The continue-on-error wording is now job-level. My local run matches "41 tests, 40 passed, the only failure is the pwsh case at :797".
  • Item 5, and threads 4669317457, 4669317486 and 4669116595: replies 4670798491, 4670798851 and 4670799110 are accurate. I re-ran a later Version: v0.20.0, Version: "", VERSION, Mozilla-Actions/Sccache-Action, sccache-action/.@ and sccache-action/foo/..@ (plus a trailing / and /./) through sccache_pin_violations. Each now fails, and each counts as one site. The correction in 4670799110 to the earlier count-lock claim is right.
  • Annubis 7109813810: there is no FullLoader or yaml.load( left in scripts/ci/, and loading goes through yaml.safe_load at :396.
  • Astraea items:
    • Item 1: fixed, as above.
    • Item 3: github_policy_yaml_paths uses root (:413-421), and the temp-root test covers .yml, .yaml, a composite action.yaml in another directory and a YAML-error file.
    • Item 5: the $, expression and inspect sccache code is gone. import inspect stays only for the older tests at :514 and :1393-1458.
    • Item 2: covered except for item 3 above.
  • Fixtures: 16 pass and 23 fail, and the names match the body's two lists one for one. Every pass fixture is clean, and every fail fixture fails at this head.
  • All 10 mozilla-actions/sccache-action@v0.0.11 uses under .github/ carry version: "v0.19.0", at the 10 lines the body lists, and the repo scan returns exactly those 10 sites.
  • CHANGELOG.md:12-15: the entry is under ### 2026-11 / #### Fixed, it's accurate, and it ends with the #772 link.
  • The Dependabot note matches .github/dependabot.yml:32 (github-actions ecosystem).
  • actionlint (1.7.12 here) reports only the two existing gpu labels, at allocation-measurement.yml:169 and gpu-frame-budget.yml:31. aw_doc_lint --mode warn is clean (641 files, 0 un-allowlisted).
  • The trace map is out of scope: the trace-sync.yml paths don't cover .github/, scripts/ci/ or the CHANGELOG.

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking

Round 2 at 97fd94a. Fresh clone, required CI green. Fixed from 6027627244: the ASCII spelling variants, github_policy_yaml_paths(root) with the temp-root test, yaml.safe_load only (:396), and the old dead $/expr guards and the getsource block. Astranox 6026944757 items 1–4 are addressed. All file:line cites in CI_ARCHITECTURE.md and CHANGELOG.md are current. Annubis hasn't ruled at this head yet.

  1. scripts/ci/test_workflow_policy.py:133 uses path split. cursor[bot] 4670962473 has no reply. I reproduced it: 0 violations and 0 sites. Fix: split on both separators, drop empty segments, then normalize. Add fail fixtures and reply on the thread.
  2. :196 with key comparison. cursor[bot] 4670962482 has no reply. I reproduced it: 0 violations and 1 site. Fix: compare keys the way the runner does, add a fail fixture and reply.
  3. :93-103 cargo install match. cursor[bot] 4670962499 has no reply. I reproduced it, and env cargo … and the cargo-binstall binary are also clean. Fix as the thread says, add fail fixtures and reply.
  4. :108-112 release URL match. cursor[bot] 4670962510 has no reply. I reproduced all 3 forms. Fix: normalize the URL path before reading the tag, accept www., reject latest/download. Add fail fixtures and reply.
  5. :377 composite using is case-sensitive. The runner compares using with OrdinalIgnoreCase (ActionManifestManager.cs:486). An action.yml with using: Composite and an unpinned sccache-action step is neither scanned nor counted. Fix: casefold using and add a fail fixture.
  6. :299-330 indirect installs aren't checked. Each of these is clean: a package name passed through a shell variable (PKG=sccache; cargo install $PKG), an alias, a glob (scc[a]che), gh release download -R mozilla/sccache, and apt-get/brew/choco install sccache. Fix: fail closed on any run that names sccache with an install verb and isn't a recognized pin. Or list these as unchecked in CI_ARCHITECTURE.md:104.
  7. docs/current/CI_ARCHITECTURE.md:104 overclaims. It says cargo install, cargo binstall, release URLs and taiki "fail unless they pin 0.19.0", and that ./.. paths are normalized. Items 1–6 show that isn't true yet. This is Astranox's item 5, which is still open in substance. Fix: close the gaps or narrow the sentence.
  8. Hand-mutation: 51 real survivors (307 mutants: 217 killed, 36 equivalent, 3 dead). Each needs a killing fixture:
    • _action_repo_and_ref: :126 ref strip. :132/:135/:143 guard returns (no docker://…@sha256:, foo@v1 or escaping-path fixture). :134 len<2 (3 mutants). :138/:140/:146 (no pass fixture for a sub-path action such as mozilla-actions/sccache-action/sub@v1, so dropping the path still passes).
    • :167 quote strip (no --version "0.19.0" fixture).
    • :196 (3 mutants): no pass fixture with an extra with key, and no non-str key.
    • _tool_specs :233/:237/:238/:240: no tool: sccache@0.20.0 fail fixture, no leading-separator case, no non-str tool.
    • _taiki_sccache_violations (17): :253, :257 (×2), :258 (×2), :272, :279 (×2), :281 (×5), :282, :284, :285, :287. Missing: a pinned-ref pass (@sccache@0.19.0), uppercase ref and tool, nextest,sccache (sccache after another tool), non-mapping with, a key before tool, and a non-taiki step with tool: sccache.
    • _run_sccache_violations :309/:321: no case with an unpinned package or URL after a pinned one.
    • :407: an empty doc returning None.
    • Regexes and constants (13): _CARGO_SCCACHE_INSTALL_RE separators, +toolchain and IGNORECASE; _SCCACHE_PKG_RE lookbehind, lookahead and @ver; --version= form; URL http and IGNORECASE; PINNED_SCCACHE_INSTALL_VERSIONS accepting 0.20.0 (no cargo, binstall or taiki fail fixture uses 0.20.0); the \-newline join; the tool split characters.
  9. Dead code. :127-132 guard (the result is the same without it), the :134 parts[0]==""/parts[1]=="" checks, the "" member at :140 (normpath never returns it), the :142-143 escape branch (falls through the same way), and the :227-231 list branch (with inputs are scalars). Delete them or make them load-bearing.
  10. scripts/ci/test_workflow_policy.py:797 pwsh case fails instead of skipping. It raises AssertionError when pwsh is absent (41 run: 40 OK, 1 FAIL). This predates the PR but is in a touched file. Fix: raise unittest.SkipTest(...), or skipUnless(shutil.which("pwsh")) on the test.

The policy test rejects an install it cannot recognize as v0.19.0.
The benchmark-alert case skips when pwsh is absent.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Head 844d10ed575c3217a03125e20d1aa289906fcf44. Not a clearance. Not green.

The four open findings on 97fd94a are fixed for the snippets they named. mozilla-actions\\sccache-action@v0.0.11, foo\\.., and //. are violations and each counts as one site. versıon (U+0131) fails: "versıon".upper() == "VERSION". Bare sudo cargo, env cargo, command cargo, cargo-binstall, and cargo install --git https://github.com/mozilla/sccache.git --tag v0.20.0 are violations. releases/latest/download, www.github.com, and a path ../ are violations. yaml.safe_load is still the loader. The ten live with.version values are the literal v0.19.0. repo_sccache_pin_violations is empty.

What is still clean is below. A shell prefix with its own flags, a & or a (, a release URL whose query or fragment contains .., a trailing-dot host, a schemeless curl, and a git URL the string compare does not normalize all install or download sccache 0.20.0 while sccache_pin_violations returns [].

Report

  1. Head SHA: 844d10ed575c3217a03125e20d1aa289906fcf44. Required checks have not finished. Replay hash (ubuntu, macOS, windows) succeeded. Gate, Security Audit, Cargo Deny, greybox, net-tests, docs, prose, pack paths, and scorecard analysis succeeded. Scorecard is neutral. determinism-replay hash is still running on all three OS. Compare has not started.
  2. Commands: python3 scripts/ci/test_workflow_policy.py on test_sccache_action_pins_binary_version, test_sccache_pin_scan_reads_workflows_under_root, and test_sccache_pull_requests_are_read_only → exit 0 (3 tests, 0.907s). PyYAML 6.0.1. Probe of sccache_pin_violations on the snippets in the inline comments. bash -c for exec, eval, time, nohup, true &, (echo), command -p, env --, and bash -c $'echo …' printed the sentinel. sudo -n -- echo and sudo -n -E echo printed. rustup run 1.89.0 echo → RUSTUP_HIT, exit 0. cargo 1.89.0 install --help lists --git and --tag. git ls-remote on the three git URLs below resolved refs/tags/v0.20.0 to 663181abeb391c94019a66d0453cd09c678ceb02. curl -I -L on the release URLs below ended at HTTP 200, content-disposition filename sccache-v0.20.0-x86_64-unknown-linux-musl.tar.gz, content-length 10547998.
  3. Not run: a local replay-hash step (no hashed crate). GPU frame budget (not measured; this machine is not the 1660 Ti). pwsh is not installed here, so the benchmark-alert case and pwsh -Command were not executed. cargo install of sccache was not run.
  4. Measurements: not measured.
  5. Replay hashes: unchanged on the diff. No hashed crate, no Cargo.lock, no RUSTFLAGS, no golden, no target-cpu edit. The three Replay hash checks succeeded on this SHA. determinism-replay hash is still running, so the compare job has not started.
  6. Deferred issues: none.

The pull request body still names 97fd94a19c8b95bd120a7e456b0a33e07dd4fe24. docs/current/CI_ARCHITECTURE.md cites the tests at 1856 and 1888, which match this file. mozilla-actions/sccache-action@v0.0.11 is still a tag. It is not in ACTION_MAJOR_FLOORS. A moved tag can ignore with.version. That is outside the binary pin this checker is locking.

Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Collapse returns whose callers do not observe the value, and extend the
fixture set so each remaining control-flow operand changes the violation
list. scripts/ci/sccache_pin_mutation.py is the pass.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Head 70d50d32729794c0fb6323cd39bcc0145263512f. This review does not clear the PR. Required checks have not all passed.

The ten live mozilla-actions/sccache-action@v0.0.11 steps still set version: "v0.19.0". repo_sccache_pin_violations is empty and repo_sccache_action_sites is 10. yaml.safe_load is still the loader (scripts/ci/test_workflow_policy.py:1104). v0.0.11 peels to fc920bf0ec8de6ee65d409111f7ec508035751ba; the action input text says an omitted version installs the latest sccache. The live steps set the input. No Cargo.lock, no hashed crate, no RUSTFLAGS / target-cpu edit, no golden edit, no new audit ignore, no new continue-on-error. The changelog Fixed entry links #772.

70d50d3 adds scripts/ci/sccache_pin_mutation.py and more fixtures. It leaves the three open holes, and gh can still select the v0.20.0 release without a violation. docs/current/CI_ARCHITECTURE.md:104 says cargo install, a mozilla/sccache release URL, and gh release download fail unless the checker recognizes a literal pin. The commands below are clean and fetch or run sccache 0.20.0. python3 scripts/ci/test_workflow_policy.py exited 0 (41 tests, 1 skipped: pwsh is absent). The PR body still names 844d10ed and the older mutant counts.

Report

  1. Head SHA: 70d50d32729794c0fb6323cd39bcc0145263512f. Replay hash (ubuntu, macOS, windows) succeeded. Gate is no longer in the incomplete set. hash (ubuntu-latest) succeeded. hash (macos-latest) and hash (windows-latest) were still running, along with the Ubuntu and Windows test archives, MSRV, and Startup passes (Windows). Scorecard neutral. Compare not started.
  2. Commands: python3 scripts/ci/test_workflow_policy.py exit 0 (41 tests, 1 skipped). The two sccache tests alone exit 0 (0.961s). Checker probes of the shell, URL, git, and gh forms above. git ls-remote of the git URLs. curl -I -L of the release URLs (headers only). gh release view and gh release download with a pattern that matches nothing.
  3. Not run: the AST mutator (scripts/ci/sccache_pin_mutation.py is not what ci.yml runs; these bypasses are not fixtures). Sim and render gates (no crate change). Replay hashes were not recomputed locally.
  4. Measurements: not measured.
  5. Replay hashes: unchanged. The three Replay hash jobs succeeded on this SHA. No hashed crate and no RUSTFLAGS / target-cpu edit.
  6. Deferred issues: none.

Threads PRRT_kwDOPp_H3s67IDBZ, PRRT_kwDOPp_H3s67IDBe, and PRRT_kwDOPp_H3s67IDBj still stand.

Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved
Comment thread scripts/ci/test_workflow_policy.py Resolved

@lazyxeon lazyxeon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking

Round 3 at 70d50d3. Fresh clone, required CI green. From 6029573121: items 1–4 are replied to and fixed for the named forms, item 5 (composite using casing) is fixed, items 8 and 9 are superseded by the rewrite, and item 10 is fixed (skipUnless at :2477). Item 6 is partly fixed, and item 7 is still open (see 2–3 below). Astranox 6029110126: items 1–2 are fixed (the lift condition is now nightly or dispatch, read from the job view, in both the doc and the body), and the item 4 table is in the body. Items 3 and 5 remain open as item 3 below. I checked all 20 file:line cites in CI_ARCHITECTURE.md and CHANGELOG.md, and they're current. Policy file: 41 run, 40 pass, 1 skipped (pwsh), 0 fail. Annubis hasn't ruled since a1bc105 (7109813810, BLOCKED).

  1. Unreplied cursor[bot] threads at 844d10e and 70d50d3. None of these has a reply: 4673648951, 4673648959, 4673648966, 4673877540, 4673877549, 4673877553 and 4673877560. I reproduced each class at head, and each comes back with 0 violations. The classes are command prefixes, separators and subshells (scripts/ci/test_workflow_policy.py:484-512, :553-564), release-URL query, fragment, host and scheme handling (:399-425, :445-452), git-URL normalization (:427-443), and repo selection for gh (:676-725). Fix each one as its thread says, add a fail fixture for each, and reply on each thread.
  2. Round-2 item 6 is only partly fixed (:742-790, :107-109). These still come back clean: an installer whose command word comes from a variable or parameter expansion, a shell-function wrapper, or a glob; PowerShell call and invoke forms; a non-bash shell: body; and package managers other than apt, brew and choco. Fix: fail closed on any run or followed script that names sccache and isn't a recognized literal pin. Or list these classes as unchecked in the doc.
  3. docs/current/CI_ARCHITECTURE.md:104 still overclaims (round-2 item 7, Astranox 3 and 5). It says "cargo install … gh release download … fail unless the checker recognizes a literal v0.19.0 pin", and items 1–2 show that isn't true yet. The body's "Anything the checker cannot prove is that pin fails" has the same problem. Fix: close the gaps, or narrow both sentences.
  4. The 657/657 can pass vacuously (scripts/ci/sccache_pin_mutation.py:265-302, :313-314). The script counts a mutant as killed when the exact violation list changes, but the CI test (test_workflow_policy.py:1894-1925) only checks empty versus non-empty. Timeouts and any exception also count as killed. I ran the same 657 mutants against the real test file: 622 killed, 29 survived and 6 timed out. That leaves 6 control-flow survivors: :498 (drop operand 0), :504 (drop operand 1), :570 (drop operand 0), :641 (continue→break), :653 (drop operand 0) and :849 (continue→break). The 6 timeouts are :471 ×2, :472 ×2, :563 and :587. The other 23 survivors change only the message text or a one-item return, and I rule them equivalent. Fix: kill against what CI asserts, report timeouts and exceptions separately, and correct the body's 657/657 and "No equivalent mutant remains".
  5. Extended hand-mutation (1886 mutants on :88-1175, full policy file, 20 s cap vs 1.2 s clean): 1453 killed, 377 survived, 47 timeouts, 9 no-ops. Of the survivors, 113 are message-only, and I rule them equivalent. The other 264 each need a killer or a recorded ruling:
    • Untested set members: :97/:102-104 (--rev, --path, --manifest-path), :108 (apt, choco.exe), :110 (all shells except bash), :112 (every downloader except curl), :613, :688, :696, :757 (.exe), :892/:1141.
    • Normalization with no killer: .strip() at :148, :158, :170, :400, :428, :512 and :798; .lower() at :428, :588, :705, :728 and :837; .resolve()/.as_posix() at :213, :859, :863, :910, :1121, :1150, :1166 and :1170.
    • Parsing branches: :159 and :173 (no fixture with an empty segment between owner and repo), :199, :210, :223, :284, :379, :387, :401-436 (URL authority, host, query and fragment), :448-449, :462, :473, :481, :494-507 and :541-572.
    • Argument parsing: :585-653 (--, the = forms, --branch/--rev, the flag skip) and :677-705.
    • Dispatch and dedupe: :125, :756-785, :796-801, :837-866 (dropping the script-follow call at :866 survives), :886-898 (both local-action notes), :987-988, :1003, :1045, :1089-1091, :1128 and :1168.
    • 47 timeouts where the index doesn't advance: :464-476, :496-510, :557-563, :587-621 and :690-704. Bound those scanners so they fail fast.

The pin checker now fails the added fixtures, and the mutation harness
counts timeouts and errors as failures after a passing baseline.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor cursor Bot changed the title ci: pin sccache v0.19.0 on mozilla-actions/sccache-action ci: pin sccache v0.19.0 and fail closed on unpinned installs Nov 24, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Head e2a88c267dab9e0f17f4610896b920e994a7e0d5. Blocking. Required checks have not all passed.

The ten live mozilla-actions/sccache-action@v0.0.11 steps still set version: "v0.19.0". repo_sccache_pin_violations is empty and repo_sccache_action_sites is 10. On tag v0.0.11, an empty version input calls repos.getLatestRelease for mozilla/sccache and installs that tag; a non-empty input is the version passed to the downloader. The commands named in the seven open threads are violations now.

The same checker still accepts installs of sccache 0.20.0. Flag operands are not consumed, $'...' is not decoded, backticks are not scanned, GH_REPO is only a same-command prefix assignment, percent-encoded and non-github.amrom.workers.dev hosts are not the project, and rustup run --install plus dash / python3 / xargs / nice / timeout never reach the cargo arm. docs/current/CI_ARCHITECTURE.md:104 says a form with no fixture is outside that paragraph. ci.yml still runs this checker, and these forms are clean. The pull request body still names 70d50d32729794c0fb6323cd39bcc0145263512f.

Report

  1. Head SHA: e2a88c267dab9e0f17f4610896b920e994a7e0d5. Blocking. Gate, Cargo Deny, Security Audit, cargo-audit/cargo-deny/SBOM, docs build, prose lint, net-tests, and pack passed. Scorecard is neutral. Replay hash (three OS), determinism-replay hash (three OS), MSRV, both test archives, Startup passes, greybox, and volumetrics are still running. Compare has not started.
  2. Commands: classification of the cited scripts against sccache_pin_violations → exit 0, each cited install clean and the previously reported forms in violation. sudo -n -u, env -u / env --unset, nice, timeout, backticks, $'...', dash -c, python3 -c, and xargs with a front-of-PATH cargo → exit 0 (CARGO_HIT). rustup run --install 1.89.0 echo → exit 0 (RUSTUP_INSTALL_HIT). gh release view under export / declare -x / GH_REPO= → exit 0, tag v0.20.0. export GH_REPO=mozilla/sccache; gh release download --pattern no-such-asset-review → exit 1, no assets match the file pattern. curl -sI -L of the %2E host → 301, 302, 200, length 10547998. curl -sI of the codeload tag archive → 200, filename sccache-0.20.0.tar.gz. GET api.github.com latest → tag v0.20.0, assets[0] the dist archive above. python3 scripts/ci/test_workflow_policy.py → exit 0 (41 tests, 1 skipped, pwsh absent).
  3. Not run: python3 scripts/ci/sccache_pin_mutation.py (CI runs test_workflow_policy.py only, at ci.yml:128). Replay hash step (no hashed crate, no Cargo.lock, no RUSTFLAGS / target-cpu edit; the three OS jobs are still running). GPU frame budget (no render change; a cloud agent cannot measure the 1660 Ti).
  4. Measurements: not measured.
  5. Replay hashes: not re-measured on this SHA. The diff has no hashed crate, no golden, and no RUSTFLAGS / target-cpu edit.
  6. Deferred issues: none.
Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

gh_repo = value
index += 1
continue
if token == "--" or (token.startswith("-") and token != "-"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_sccache_skip_wrapper_flags treats every token that starts with - as a flag with no operand, so the next word becomes the command. These steps are clean. A cargo placed first on PATH printed CARGO_HIT install sccache --version 0.20.0 for each one (exit 0):

  • sudo -u ubuntu cargo install sccache --version 0.20.0
  • sudo -u ubuntu -- cargo install sccache --version 0.20.0
  • sudo -Eu ubuntu cargo install sccache --version 0.20.0
  • env -u LANG cargo install sccache --version 0.20.0
  • env --unset LANG cargo install sccache --version 0.20.0

sudo --user=ubuntu cargo install sccache and env --unset=LANG cargo install sccache are violations, because the operand shares the flag token. sudo -E cargo install sccache is a violation now.

When a flag takes a value (-u, -g, a cluster such as -Eu, --user, --unset), consume the next word before choosing the command.

index += 1
continue
if char == "$" and _sccache_at(command, index + 1) in "'\"":
index += 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the $ in front of ' or " keeps the quoted bytes as the token. Bash still decodes $'...'. These steps are clean, and bash printed CARGO_HIT install sccache --version 0.20.0:

  • bash -c $'\143argo install sccache --version 0.20.0' (\143 is c)
  • eval $'\x63argo install sccache --version 0.20.0'
  • eval $'cargo\x20install\x20sccache --version 0.20.0'

bash -c $'cargo install sccache' is a violation now. Decode $'...' before the inner text is tokenized.

break
continue
opener = ""
if script.startswith("$(", index):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_sccache_extra_texts only opens (, $(, and {. A backtick command substitution is not a group. `cargo install sccache --version 0.20.0` is clean. With the same front-of-PATH cargo, : `cargo install sccache --version 0.20.0` wrote CARGO_HIT install sccache --version 0.20.0. $(cargo install sccache --version 0.20.0) is a violation. Scan backtick substitutions the same way.

return violations


def _sccache_gh_violations(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo is only the GH_REPO= prefix on this simple command. An earlier export or declare -x, and a step env: map, never set it. These are clean. gh release view --json tagName returned {"tagName":"v0.20.0"} (publishedAt 2026-11-23T07:08:09Z on the export form):

  • export GH_REPO=mozilla/sccache and then gh release download
  • declare -x GH_REPO=mozilla/sccache and then gh release download
  • step env: {GH_REPO: mozilla/sccache} with run: gh release download

export GH_REPO=mozilla/sccache followed by gh release download --pattern no-such-asset-review is also clean, and that download answered no assets match the file pattern (exit 1), so it resolved mozilla/sccache's release. GH_REPO=mozilla/sccache gh release download on one simple command is a violation. Read GH_REPO from export, declare -x, and the step env map.

url_path = ""
if "@" in authority:
authority = authority.rsplit("@", 1)[-1]
host = authority.split(":", 1)[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host is the authority text before the first /, with no percent-decoding, and only github.com and www.github.com (one trailing dot stripped) count. These steps are clean:

  • curl -fsSL https://github.com%2E/mozilla/sccache/releases/download/v0.20.0/sccache-v0.20.0-x86_64-unknown-linux-musl.tar.gz. curl: 301 to that path on github.com, then 302, then 200, content-disposition: attachment; filename=sccache-v0.20.0-x86_64-unknown-linux-musl.tar.gz, content-length: 10547998.
  • curl -fsSL -o sccache.tar.gz https://codeload.github.com/mozilla/sccache/tar.gz/refs/tags/v0.20.0. curl: 200, content-disposition: attachment; filename=sccache-0.20.0.tar.gz.
  • url=$(curl -fsSL https://api.github.com/repos/mozilla/sccache/releases/latest | python3 -c '...') and then curl -fsSL "$url". The latest release is tag v0.20.0 (publishedAt 2026-11-23T07:08:09Z). assets[0] is sccache-dist-v0.20.0-aarch64-unknown-linux-musl.tar.gz (6209909 bytes). The $url token does not contain SCCACHE, so the downloader arm does not flag it.

https://github.com./mozilla/sccache/releases/download/v0.20.0/... is a violation. Unquote the host before the compare. Treat codeload.github.com and an api.github.com /repos/mozilla/sccache URL as that project.

):
index += 3 if index + 2 < length else 2
continue
if base.lower() in _SCCACHE_WRAPPERS or token == "&":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wrapper set is sudo, command, env, exec, eval, time, and nohup. rustup run always skips three tokens, so an option is consumed as the toolchain. These steps are clean. A front-of-PATH cargo printed CARGO_HIT install sccache --version 0.20.0 for the first five. rustup run --install 1.89.0 echo RUSTUP_INSTALL_HIT printed RUSTUP_INSTALL_HIT (toolchain 1.89.0 is already installed; rustup run --help places --install before <TOOLCHAIN>):

  • nice cargo install sccache --version 0.20.0
  • timeout 5 cargo install sccache --version 0.20.0
  • dash -c 'cargo install sccache --version 0.20.0'
  • python3 -c 'import os; os.system("cargo install sccache --version 0.20.0")'
  • printf '%s ' 'sccache --version 0.20.0' | xargs cargo install
  • rustup run --install 1.89.0 cargo install sccache --version 0.20.0

time cargo install sccache, bash -c 'cargo install sccache', and rustup run 1.89.0 cargo install sccache are violations. Skip rustup run options before the toolchain. Treat dash, python3, xargs, nice, and timeout as transparent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants